package com.offcn;

import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.spring.autoconfigure.MeterRegistryCustomizer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableAsync
@SpringBootApplication
public class Prometheusdemo04Application {

    public static void main(String[] args) {
        SpringApplication.run(Prometheusdemo04Application.class, args);
    }
    @Bean
    MeterRegistryCustomizer<MeterRegistry> configurer(){
        return (registry -> registry.config().commonTags("application","prometheus01"));
    }
}
